<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">  
    <h:head>
        <title>Meal Purchase</title>
        <style type="text/css">
            body{
                margin-top: 50px;
                margin-left:150px; 
                margin-right:150px; 
            }
            .ui-tabs{
                background: #ece3a5; 
                padding:15px;
            }
            .ui-tabs-nav{
                background: #D20005;
                padding:15px;
            }
            .ui-tabs-panel{
            }
        </style>
    </h:head>
    <h1> IOTR Customer Portal</h1>
    <h:body>
        <h:form >
            <p:panel style="background: #ece3a5;">
                <p:panel style="color: #FFFFFF; background: crimson">
                    <h:outputText style="color:#FFFFFF; font-style: italic; font-weight: bold; font-family: serif" 
                                  value="You're about to add a food item into shopping cart"/>
                </p:panel>
                <h:panelGrid columns="2">
                    <h:outputText value="Item name: #{FoodOrderManagerBean.singleItem.foodItemName}"/> <h:outputText/>
                    <h:outputText value="Seller: #{FoodOrderManagerBean.singleItem.stakeholderName} (
                                  #{FoodOrderManagerBean.singleItem.outletName})"/>
                    <p:commandLink style="color:darkgoldenrod; font-style: italic; font-size: large;
                                   font-family: Helvetica" value="see available food items for this outlet"/>

                    <h:outputText value="Price: #{FoodOrderManagerBean.singleItem.price}"/><h:outputText/>
                    <h:outputText value="Type: #{FoodOrderManagerBean.singleItem.type}"/><h:outputText/>
                    <h:outputText value="Address: #{FoodOrderManagerBean.singleItem.address}"/><h:outputText/>
                    <h:outputText value="Phone number: #{FoodOrderManagerBean.singleItem.phoneNumber}"/><h:outputText/>
                    <h:outputText value="Path: #{FoodOrderManagerBean.singleItem.pathName}"/><h:outputText/>
                    <h:outputText value="Please enter quantity: "/>
                    
                    <h:inputText value="#{FoodOrderManagerBean.singleItem.qty}">
                        <f:validateLongRange minimum="1"/> 
                    </h:inputText>

                    <p:commandButton action="#{FoodOrderManagerBean.addToCart_singleItem()}"
                                     value="Add to cart" >
                    </p:commandButton>
                </h:panelGrid>
            </p:panel>
        </h:form>
    </h:body>
</html>
